<?php
include('include/config.inc.php');
////Sub Category Selection : Start

$categoryId                        = $_GET['categoryId'];
$subCategoryArr['subCategoryId']   = array();
$subCategoryArr['subCategoryName'] = array();
$subCategoryQuery = "SELECT subCategoryId,categoryId,subCategoryName
                       FROM subcategory
                      WHERE categoryId = ".$_GET['categoryId']."
                   ORDER BY subCategoryName";
$subCategoryQueryRes = mysql_query($subCategoryQuery);
$i = 0;
while($subCategoryRow = mysql_fetch_array($subCategoryQueryRes))
{
  $subCategoryArr['subCategoryId'][$i]   = $subCategoryRow['subCategoryId'];
  $subCategoryArr['subCategoryName'][$i] = $subCategoryRow['subCategoryName'];
  $i++;
}

////Sub Category Selection : End

include("./bottom.php");
$smarty->assign("subCategoryArr",$subCategoryArr);
$smarty->assign("categoryId",$categoryId);
$smarty->display("subCategoryAjSupp.tpl");
?>